import request from "@/utils/request.js";

// 新增文章
export const addArticleService = (articleData) => {
    return request.post('/article/add', articleData)
}

// 获得文章列表
export const getArticleService = (params) => {
    return request.get('/article/page', {params:params})
}

// 获取文章详情
export const getArticleDetailService = (id) => {
    return request.get(`/article/${id}`)
}

// 点赞文章
export const likeArticleService = (id) => {
    return request.put(`/article/like/${id}`)
}